<%@page language="java" pageEncoding="UTF-8" %>
<%@page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE HTML>
<html>
<head>
<title>网页计数器</title>
</head>
<body>
<%  if (application.getAttribute("counter")==null)
	application.setAttribute("counter","1");
	else{
		String times=null;
		times=application.getAttribute("counter").toString();
		int icount=0;
		icount=Integer.valueOf(times).intValue();
		icount++;
		application.setAttribute("counter",Integer.toString(icount));
		}  %>
您是第<%=application.getAttribute("counter")%>位访问者！
</body>
</html>
